package com.niit.service.impl;

import com.niit.dao.PlaceMapper;
import com.niit.pojo.Place;
import com.niit.service.PlaceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PlaceServiceImpl implements PlaceService {
    @Autowired
    private PlaceMapper placeMapper;
    @Override
    public List<Place> selectAllPlace() {
        return placeMapper.selectAllPlace();
    }

    @Override
    public int addPlace(Place place) {
        return placeMapper.addPlace(place);
    }

    @Override
    public Place selectPlaceByName(int id) {
        return placeMapper.selectPlaceByName(id);
    }

    @Override
    public int deletePlaceById(int place_id) {
        return placeMapper.deletePlaceById(place_id);
    }

    @Override
    public int selectIdByName(String name) {
        return placeMapper.selectIdByName(name);
    }

    @Override
    public int updatePlace(Place place) {
        return placeMapper.updatePlace(place);
    }


}
